package com.sgcc.ln.pmos.e_ln_mall.adapter;


import android.widget.LinearLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sgcc.ln.pmos.common.view.LineChartView;
import com.sgcc.pmos.nativesdk.R;
import com.sgcc.ln.pmos.e_ln_mall.bean.CurveHistoryDataBackBean;

import java.util.List;

public class HistoryCurveDataAdapter extends BaseQuickAdapter<CurveHistoryDataBackBean, BaseViewHolder> {


    public HistoryCurveDataAdapter(List<CurveHistoryDataBackBean> list) {
        super(R.layout.item_electricity_proportion_line_chart, list);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, CurveHistoryDataBackBean s) {
        baseViewHolder.setText(R.id.tvTitle, s.getTitle());
        LinearLayout llLineChart1 = baseViewHolder.getView(R.id.llLineChart1);
        LineChartView lineChartView = new LineChartView(getContext(), s.getYAxisList(), 1,false, true);
        llLineChart1.addView(lineChartView);
    }
}
